package com.xujl.mvcbind.adapter;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.xujl.fastlib.base.BaseRvAdapter;
import com.xujl.mvcbind.R;
import com.xujl.mvcbind.bean.ListBean;
import com.xujl.mvcbind.widget.CustomEditText;

import java.util.List;

import androidx.annotation.Nullable;

/**
 * @author x
 * @Description
 */
public class WebListAdapter extends BaseRvAdapter<ListBean> {
    public WebListAdapter (@Nullable List<ListBean> data) {
        super(R.layout.item_web_list, data);
    }

    private ListBean index;

    @Override
    protected void convert (BaseViewHolder helper, ListBean item) {
        helper.setIsRecyclable(false);
        CustomEditText editText = helper.getView(R.id.et_input);
        helper.setText(R.id.et_input, item.getTitle());
        editText.setInputListener(item::setTitle);

    }

    public void setIndex (ListBean index) {
        this.index = index;
    }
}
